package com.ruben.simplescaffold.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 页面跳转Controller
 *
 * @author <achao1441470436@gmail.com>
 * @since 2021/6/17 14:20
 */
@Controller
public class PageController {

    /**
     * 自定义跳转视图
     *
     * @param page 页面
     * @author <achao1441470436@gmail.com>
     * @since 2021/6/17 14:30
     */
    @GetMapping("{page}")
    public String page(@PathVariable String page) {
        return page;
    }

    /**
     * 自定义H5跳转视图
     *
     * @param page 页面
     * @return java.lang.String
     * @author <achao1441470436@gmail.com>
     * @since 2021/8/4 16:50
     */
    @GetMapping("/h5/{page}")
    public String mobilePage(@PathVariable String page) {
        return "h5/" + page;
    }

    /**
     * H5首页
     *
     * @author <achao1441470436@gmail.com>
     * @since 2021/8/4 16:52
     */
    @GetMapping("h5")
    public String mobileIndex() {
        return "h5/index";
    }
}
